import uviewPlus from 'uview-plus'
import {
	createSSRApp
} from "vue";
import * as Pinia from 'pinia';
import { createUnistorage } from 'pinia-plugin-unistorage'
import App from "./App.vue";
import mixins from "@/mixins/index";

export function createApp() {
	const app = createSSRApp(App);
	const store = Pinia.createPinia();
	store.use(createUnistorage());
	app.use(uviewPlus)
	app.use(store);
	app.mixin(mixins)

	uni.$u.config.unit = 'rpx'; // uni配置
	
	return {
		app,
		Pinia
	};
}
